package com.hebeiwangxiaozhang.product.pojo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.MongoId;

import java.math.BigDecimal;
import java.util.Map;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ShoppingCarts {
    @Id
    @MongoId //这样我们使用 mongotemaple的save方法的时候，如果id存在则更新（count增加）。如果不存在则新增
    private String id; // personId + skuId
    private Long skuId;
    private Integer shopId;
    private Map<String, Object> skuAttr;
    private BigDecimal price;
    private Integer count;
    private Boolean selected;
    private String personId;
    private String title;
    private String image;
}
